package cn.service.Impl;

import cn.dao.UserDao;
import cn.dao.impl.UserDaoImpl;
import cn.entity.User;
import cn.factory.UserDaoFactory;
import cn.service.UserService;

public class UserServiceImpl implements UserService {
    //实例化所依赖的UserDao对象
    //private UserDao dao = new UserDaoImpl();
    private UserDao dao = UserDaoFactory.getInstance();
    @Override
    public void save(User user) {
        dao.save(user);
    }
}
